﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Bussiness;

namespace EWebsite.Admin.Brokers {
    public partial class TranferMoneyToProvider : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {

        }

        protected void btnTranfer_Click(object sender, EventArgs e) {
            try {
                String SID = CallWS.loginBroker();
                int result = CallWS.tranferMoneyForProvider(SID, txtCardNumber.Text.Trim(), float.Parse(txtAmount.Text), "", txtCardHolderName.Text.Trim());
                if (result == 0) {
                    lblMessage.Text = "Chuyen khoan thanh cong";
                }
                else if (result == 1) {
                    lblMessage.Text = "chuyen khoan that bai";
                }
                else {
                    lblMessage.Text = "khong biet loi";
                }
            }
            catch (Exception ex) {
                lblMessage.Text = ex.Message;
            }
        }
    }
}